1. Field of the Invention
The present invention relates to image processing, and, in particular, to the compression of video images subject to transparency processing.
2. Description of the Related Art
Conventional video cameras generate video images in the form of three-component (e.g., red (R), green (G), and blue (B)) analog signals. Conventional personal computer (PC)-based video compression systems process these video signals for transmission and/or storage for subsequent playback by (1) digitizing the analog RGB signals into digital RGB data; (2) converting the RGB data to a color format that provides better compression (e.g., YUV); (3) subsampling the chroma components (e.g., U and V) to generate subsampled data (e.g., YUV9 format); and (4) applying a compression algorithm to the subsampled data to generate an encoded video bitstream.
In YUV9 format, for every (4.times.4) block of 8-bit Y (luma) components there is one 8-bit U (chroma) component and one 8-bit V (chroma) component. The color format is called YUV9 because there is an average of 9 bits per pixel in the subsampled image data. To generate YUV9 data under some conventional subsampling schemes, some form of averaging is applied to each (4.times.4) block of U components of the original unsampled data to generate each U component of the subsampled YUV9 data, and similarly for the V components. In the simplest scheme, the 16 U components in each (4.times.4) block are summed and the total divided by 16 to generate the subsampled U component, and similarly for V. More sophisticated schemes may rely on some form of weighted averaging, where each of the 16 chroma components contributes differently to the result depending upon its location within the (4.times.4) block.
The resulting subsampled image data may then be subjected to further compression processing (either lossy or lossless) to generate an encoded bitstream. When this compression processing involves the application of chroma-key-based transparency masks, the images generated by decoding the encoded bitstream can exhibit a video artifact known as a "fringe," "halo," or "color bleeding" at the edges between transparent and opaque regions. This artifact tends to reduce the quality of the video playback.
It is accordingly an object of this invention to overcome the disadvantages and drawbacks of the known art and to provide a subsampling scheme that reduces the above-described artifact and thereby improves the quality of video playback when transparency masks are applied during video compression.
Further objects and advantages of this invention will become apparent from the detailed description of a preferred embodiment which follows.